import { ExtractPropTypes } from "vue"
import { ZIndex } from '../../config/index'

/**
 * props参数
 */
export const overlayProps = {
  /** 显示遮罩 */
  show: {
    type: Boolean,
    default: false
  },
  /** 遮罩层级, 默认值为9999 */
  zIndex: {
    type: [String, Number],
    default: ZIndex.mask
  },
  /** 动画时长, 单位ms, 默认250 */
  duration: {
    type: [String, Number],
    default: 250
  },
  /** 背景透明度[0-1], 默认值为0.4 */
  opacity: {
    type: [String, Number],
    default: 0.4
  },
  /** 自定义样式 */
  customStyle: {
    type: Object,
    default: () => {
      return {}
    }
  }
}
export type OverlayProps = ExtractPropTypes<typeof overlayProps>

export const overlayEmits = {
  /** 点击事件 */
  click: () => true
}
export type OverlayEmits = typeof overlayEmits
